﻿@model WebApplication.Models.Ann

@{
    ViewBag.Title = "Ann "+Model.name;
}

<h2>Edit</h2>


@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    
    <div class="form-horizontal">
       
        <hr />
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
        @Html.HiddenFor(model => model.id)
        <div class="form-group">
            @Html.LabelFor(model => model.name, htmlAttributes: new {@class = "control-label col-md-2"})
            <div class="col-md-10">
                @Html.EditorFor(model => model.name, new {htmlAttributes = new {@class = "form-control"}})
                @Html.ValidationMessageFor(model => model.name, "", new {@class = "text-danger"})
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.note, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.note, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.note, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.Label("Time", htmlAttributes: new {@class = "control-label col-md-2"})
            <div class="col-md-10">
                @Html.Label(Model.dateTime.ToString(), new {htmlAttributes = new {@class = "form-control"}})
             
            </div>
        </div>


    

        <div class="form-group">
            @Html.Label("DataSet", htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.ActionLink(Model.DataSet.name, "Edit/" + Model.DataSet.id, "DataSet")
            </div>
        </div>

  


        <div class="form-group">
            @Html.Label("Work", htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.ActionLink(Model.Work.name, "Edit/" + Model.DataSet.id, "Work")
            </div>
        </div>

        <div class="form-group">
            @Html.Label("Value", htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.Label(Model.test, new { htmlAttributes = new { @class = "form-control" } })
            
            </div>
        </div>
        <div class="form-group">
            @Html.Label("File", htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.ActionLink("Download", "GetFile//" + Model.id)
            </div>
        </div>
      

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Save" class="btn btn-default" />
            </div>
        </div>
    </div>
}

<div>
    <img src="@Url.Action("GetChart/"+Model.id)" />
</div>

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
